package com.wwe.kotlinstudy.util

/**
 * @name KotlinStudy
 * @package name：com.wwe.kotlinstudy.util
 * @anthor DavidZhang
 * @time 2018/4/17 15:15
 * @class describe
 */
class MapStudy {

    fun test1() {
        val readWriteMap = hashMapOf("foo" to 1, "bar" to 2) //可变
        println(readWriteMap["foo"]) // 输出“1”
        val snapshot: Map<String, Int> = HashMap(readWriteMap)//只读
    }
}